using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace HDS.Model.Entity.Master
{
    /// <summary>
    /// 酒店佣金 
    /// </summary>
    [SugarTable("hotel_commission")]
    public class HotelCommission
    {
        /// <summary>
        /// ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
        public int Id { get; set; }

        /// <summary>
        /// 供应商
        /// </summary>
        [SugarColumn(ColumnName = "supplier")]
        public string Supplier { get; set; }

        /// <summary>
        /// 分销商
        /// </summary>
        [SugarColumn(ColumnName = "distributor")]
        public string Distributor { get; set; }

        /// <summary>
        /// 国家
        /// </summary>
        [SugarColumn(ColumnName = "country_code")]
        public string CountryCode { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        [SugarColumn(ColumnName = "city_code")]
        public string CityCode { get; set; }

        /// <summary>
        /// 酒店ID
        /// </summary>
        [SugarColumn(ColumnName = "hotel_id")]
        public int? HotelId { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        [SugarColumn(ColumnName = "start_date")]
        [Newtonsoft.Json.JsonConverter(typeof(ShortDateConvert))]
        public DateTime? StartDate { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        [SugarColumn(ColumnName = "end_date")]
        [Newtonsoft.Json.JsonConverter(typeof(ShortDateConvert))]
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 开始时间点 客人查价时间点
        /// </summary>
        [SugarColumn(ColumnName = "start_time")]
        public int? StartTime { get; set; }

        /// <summary>
        /// 结束时间点 客人查价时点；如 end_time < start_time，end_time 为第二天钟点
        /// </summary>
        [SugarColumn(ColumnName = "end_time")]
        public int? EndTime { get; set; }

        /// <summary>
        /// 最大价格
        /// </summary>
        [SugarColumn(ColumnName = "max_price")]
        public decimal? MaxPrice { get; set; }

        /// <summary>
        /// 最小价格
        /// </summary>
        [SugarColumn(ColumnName = "min_price")]
        public decimal? MinPrice { get; set; }

        /// <summary>
        /// 佣金类型 0百分比 1金额(间夜)
        /// </summary>
        [SugarColumn(ColumnName = "plus_rate_type")]
        public int PlusRateType { get; set; } = 0;

        /// <summary>
        /// 佣金
        /// </summary>
        [SugarColumn(ColumnName = "plus_rate")]
        public decimal PlusRate { get; set; }

        /// <summary>
        /// 允许亏损
        /// </summary>
        [SugarColumn(ColumnName = "loss_rate")]
        public decimal LossRate { get; set; } = 0;

        /// <summary>
        /// 更新人id
        /// </summary>
        [SugarColumn(ColumnName = "updated_by")]
        public int UpdatedBy { get; set; }

        /// <summary>
        /// 更新人姓名
        /// </summary>
        [SugarColumn(ColumnName = "updated_by_name")]
        public string UpdatedByName { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "updated_time")]
        public DateTime UpdatedTime { get; set; }

    }
}
